<?php
namespace app\common\model;


class Queue
{
    public function __construct() {

    }

    /**
     * 压入消息队列
     * @param $class
     * @param $method
     * @param $data
     */
    static public function push($list,$class,$method,$data){
        $redis=new Redis();
        $msg=array('class'=>$class,'method'=>$method,'data'=>$data);
        Log::record(json_encode($msg,JSON_UNESCAPED_UNICODE),'PUSHMSG');
        return $redis->lPush($list,json_encode($msg));
    }

}